//
//  TowerObject.h
//  TowerDefence
//
//  Created by K3 on 5/29/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "cocos2d.h"
#import "GameObject.h"
#import "GameLayer.h"
#import "Define.h"
#import "StoneBullet.h"
#import "GameCharacter.h"

@interface TowerObject : GameObject {
    CCSprite *optionMenu;
    CCSprite *range;
    BOOL isShowOptionMenu;
    
    float maxRadiusFireTarget;
    
    GameObject * targetLocked;
    BOOL isShooting;
    
    int buyPrice;
    
    BulletObject *bullet;
}
@property (nonatomic,retain) CCSprite *range;
@property (nonatomic) float maxRadiusFireTarget;
@property (nonatomic) int buyPrice;

-(id)initTowerObjectWith:(GameLayer *)_gameLayer;
//-(NSMutableArray*)loadAnimationWithNumberOfFrames:(int) numberOfFrames withFrameName:(NSString*)frame;
-(void)initOptionMenu;
-(void)showOption;
-(void)sellTowerObjectAnimation;
-(void)sellTowerObjectCallback;
-(void)upgradeTowerAnimation;
-(void)upgradeTowerCallback;

-(void)lockTarget:(GameObject *)_target;
-(void)findAndFireTarget;
-(void)fireTarget;
-(void)shootTargetAnimation;
-(void)hitTargetOfBullet:(GameObject *)_bullet;

@end
